/*
  学习目标：React中事件传值
*/

import React from 'react';
export default class App extends React.Component {
  render() {
    return (
      <div>
        {/* 简写👍 */}
        <button onClick={(e) => this.handleClick(1, e, 2)}>点我传值</button>
        {/* 上方代码等同于下方代码 */}
        <button
          onClick={(e) => {
            this.handleClick(1, e, 2);
          }}
        >
          点我传值
        </button>
      </div>
    );
  }

  handleClick(num, e, num2) {
    console.log(num, e, num2);
  }
}
